package com.group4.edu.service;

import com.group4.edu.entity.Chapter;
import com.baomidou.mybatisplus.extension.service.IService;
import com.study.vo.ChapterVO;

import java.util.List;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author cloud
 * @since 2022-03-10
 */
public interface ChapterService extends IService<Chapter> {
    /**
     * 查章节带小节
     * @param courseId
     * @return
     */
    List<ChapterVO> selectChapterAndVideoByCourseId(String courseId);

    /**
     * 根据id删除章节及其小节
     * @param id
     */
    void  deleteChapterById(String id);

    /**
     * 根据课程id删除章节
     * @param courseId
     */
    void deleteChapterByCourseId(String courseId);
}
